# Contributor: Michał Polański <michal@polanski.me>
# Maintainer: Michał Polański <michal@polanski.me>
pkgname=qpwgraph
pkgver=0.7.9
pkgrel=0
pkgdesc="Graph manager for PipeWire"
url="https://gitlab.freedesktop.org/rncbc/qpwgraph"
license="GPL-2.0-or-later"
arch="all"
makedepends="cmake samurai alsa-lib-dev pipewire-dev qt6-qtbase-dev qt6-qtsvg-dev"
subpackages="$pkgname-doc"
source="https://gitlab.freedesktop.org/rncbc/qpwgraph/-/archive/v$pkgver/qpwgraph-v$pkgver.tar.gz
	ungit-version.patch
	"
builddir="$srcdir/$pkgname-v$pkgver"
options="!check" # no test suite

build() {
	CXXFLAGS="$CXXFLAGS -flto=auto" \
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=MinSizeRel \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCONFIG_WAYLAND=ON
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
0e50cc06b6ab8f933b8e46439e7f07725ccd050b6bae723a82f7bd83b09c9e5aa7443d2aa63a9e03abae376511f20a1560df9a94b0e94c9f4c1100056e882709  qpwgraph-v0.7.9.tar.gz
390065eb483e290f3316264ff4d845e15badf94e5eec957e27d2edc73b594fcb1071a24a9e827b095d8991af2598da382ff73e18a84c8ba812590dd496acd0b0  ungit-version.patch
"
